<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/7/4
 * Time: 10:47
 */

namespace common\models\Service;


use common\models\DAO\InvestList;

class InvestListService {
    public static function add($param){
        //投资记录
        $investList = new InvestList();
        $investList->userID = $param['userID'];
        $investList->investID = $param['investID'];
        $investList->title = $param['title'];
        $investList->startTime = $param['startTime'];
        $investList->endTime = $param['endTime'];
        $investList->createTime = $param['createTime'];
        $investList->rate = $param['rate'];
        $investList->money = $param['money'];
        $investList->accrual = $param['accrual'];
        $investList->hongBao = $param['hongbao'];
        $investList->couponID = $param['couponID'];
        $investList->coupon = $param['coupon'];
        $investList->sourceID = $param['sourceID'];
        $investList_result = $investList->save();
        return $investList_result;
    }
}